package com.maleant.mvvm.basemvvm;

import android.app.Application;

import com.maleant.mvvm.basemvvm.db.AppDatabase;

/**
 * Created by ant on 17-12-11.
 */

public class BasicApp extends Application {
    private AppExecutors mAppExecutrors;

    @Override
    public void onCreate() {
        super.onCreate();
        mAppExecutrors = new AppExecutors();

    }

    public AppDatabase getDatabase(){
        return AppDatabase.getsInstance(this,mAppExecutrors);
    }

    public DataRepository getRepository(){
        return DataRepository.getInstance(getDatabase());
    }
}
